using Albatross.Common.Messaging;
using Albatross.Common.WCF;
using Albatross.ServerSide.Messaging;
using System.ServiceModel;

namespace Albatross.ServerSide.WCF
{
	[ServiceBehavior( InstanceContextMode = InstanceContextMode.PerCall )]
	public class WcfRequestProcessor : IWcfRequestProcessor
	{
		private IRequestProcessor _RequestProcessor;
		/// <summary>
		/// Initializes a new instance of the WcfRequestProcessor class.
		/// </summary>
		public WcfRequestProcessor()
		{
			_RequestProcessor = new RequestProcessor();
		}
		public WcfRequestProcessor( IRequestProcessor requestProcessor )
		{
			_RequestProcessor = requestProcessor;
		}

		public virtual Response[] Process( params Request[] requests )
		{
			return _RequestProcessor.Process( requests );
		}

		public virtual Response[] Process( params DotNetRequest[] requests )
		{
			return _RequestProcessor.Process( requests );
		}

		#region IDisposable Members

		public void Dispose()
		{
		}

		#endregion
	}
}